# -*- coding: utf-8 -*-

'''
Created on 01.06.2011

@author: Vlasov A. I. <root@proscript.ru>
'''

from django.conf.urls.defaults import patterns



urlpatterns = patterns('blog.views',
    (r'^$', 'main'),
    
    (r'^post/(?P<post_id>\d+)/$', 'post'),
    #TODO: выяснить, как быть с кириллицей в url
    (r'^post/(?P<slug>[^/]+)/$', 'post'),
    
    (r'^(?P<year>[0-9]{4})(/(?P<month>[0-9]{2})(/(?P<day>[0-9]{2}))?)?/((?P<slug>[^/]*)/)?$',
        'by_date'
    ),
) 